<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<head>
    <title>详情</title>
    <th:block th:replace="~{/backstage/common_resources::common_css}"/>
    <th:block th:replace="~{/backstage/common_resources::common_js}"/>
</head>

<!-- 第二个设置颜色-->
<body class="hold-transition skin-black-light sidebar-mini">
<!--    头部-->
    <header th:replace="~{/backstage/common_header::header}"></header>
<!--边栏-->
    <aside th:replace="~{/backstage/common_aside::aside}"></aside>

<!-- 内容区域 -->
<!-- @@master = admin-layout.html-->
<!-- @@block = content -->

<div class="content-wrapper">

    <!-- 内容头部 -->
    <section class="content-header">
        <h1>
            管理员管理
            <small>详情列表</small>
        </h1>
        <ol class="breadcrumb">
            <li><a th:href="@{/backstage/index}"><i class="fa fa-dashboard"></i> 首页</a></li>
            <li><a th:href="@{/backstage/admin/all}">管理员管理</a></li>
            <li class="active">详情列表</li>
        </ol>
    </section>
    <!-- 内容头部 /-->

    <!-- 正文区域 -->
    <section class="content">

        <div class="box-body">

            <!--tab页-->
            <div class="nav-tabs-custom">

                <!--树表格-->
                <div class="tab-pane" id="tab-treetable">
                    <table id="collapse-table" class="table table-bordered table-hover dataTable">
                        <thead>
                        <tr>
                            <th>名称</th>
                            <th>详情</th>
                        </tr>
                        </thead>
                        <tr>
                            <td th:text="${admin.username}"></td>
                        </tr>
                        <tbody th:each="role,status:${admin.roles}">
                        <!--                    attr添加自定义属性-->
                        <tr th:attr="data-tt-id=${status.index}" >
                            <td th:text="${role.roleName}"></td>
                            <td th:text="${role.roleDesc}"></td>
                        </tr>
                        <tr th:each="permission:${role.permissionList}" th:attr="data-tt-parent-id=${status.index}" data-tt-id="1-1">
                            <td th:text="${permission.permissionName}"></td>
                            <td th:text="${permission.permissionDesc}"></td>
                        </tr>
                        </tbody>


                    </table>
                </div>
                <!--树表格/-->

            </div>
            <!--tab页/-->



        </div>

    </section>
    <!-- 正文区域 /-->

</div>
<!-- @@close -->
<!-- 内容区域 /-->


<!--底部-->
<footer th:replace="~{/backstage/common_footer::footer}"></footer>

<script>
<!--    使树表格能够收放-->
    $(document).ready(function() {

        /*table tree*/
        $("#collapse-table").treetable({
            expandable: true
        });

    });
</script>
</body>

</html>